package com.example.demo.dao;

import com.example.demo.model.Articleinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {

    List<Articleinfo> getListByUid(@Param("uid")int uid);

    int del(@Param("aid")Integer aid,int uid);

    int add(Articleinfo articleinfo);

    Articleinfo getArticleByIdAndUid(@Param("aid")int aid,
                                     @Param("uid")int uid);

    int update(Articleinfo articleinfo);

    Articleinfo getDetailById(@Param("aid")int aid);

    int getArtCountByUid(@Param("uid")int uid);

    int incrementRCount(@Param("aid")int aid);

    public List<Articleinfo> getListByPage(@Param("psize")
                                           int psize,@Param("offset")int offset);
    int getCount();
}
